package com.raycloud.erp.omll.provider.enums;

/***
 * @DESCRIPTION:  omall交易状态枚举 这里和status 大小写保持一致
 * @author 枫伦
 * @params:
 * @return: 
 * @Date: 2021/1/13 7:38 下午 
 * @Modified By:  
*/
public enum TradeStatusEnum {
    omall_unshipped("omall_unshipped_whole_notpassed", "未发货"),

    omall_unshipped_part("omall_unshipped", "未发货 & 部分退款  --应该不存在"),

    omall_unshipped_part_wait("omall_unshipped_part_wait", "未发货 & 部分退款 & 待审核"),

    omall_unshipped_part_passed("omall_unshipped_part_passed", "未发货 & 部分退款 & 审核通过"),

    omall_unshipped_whole("omall_unshipped_whole", "未发货 && 全部退款 --应该不存在"),
    omall_unshipped_whole_wait("omall_unshipped_whole_wait", "未发货 && 全部退款 && 待审核"),
    omall_unshipped_whole_passed("omall_unshipped_whole_passed", "未发货 && 全部退款 && 审核通过"),
    omall_unshipped_whole_notpassed("omall_unshipped_whole_notpassed", "未发货 && 全部退款 && 审核不通过"),
    omall_partialshipped("omall_partialshipped", "部分发货"),
    omall_partialshipped_part_wait("omall_partialshipped_part_wait", "部分发货 && 部分退款 && 待审核"),
    omall_partialshipped_part_passed("omall_partialshipped_part_passed", "部分发货 && 部分退款 && 审核通过"),
    omall_partialshipped_part_notpassed("omall_partialshipped_part_notpassed", "部分发货 && 部分退款 && 审核不通过"),
    omall_partialshipped_whole("omall_partialshipped_whole", "部分发货 && 全部退款  --应该不存在"),
    omall_partialshipped_whole_wait("omall_partialshipped_whole_wait", "部分发货 && 全部退款 && 待审核"),
    omall_partialshipped_whole_passed("omall_partialshipped_whole_passed", "部分发货 && 全部退款 && 审核通过"),
    omall_partialshipped_whole_notpassed("omall_partialshipped_whole_notpassed", "部分发货 && 全部退款 && 审核不通过"),
    omall_allshipped("omall_allshipped", "全部发货"),
    omall_allshipped_part_wait("omall_allshipped_part_wait", "全部发货 && 部分退款 && 待审核"),
    omall_allshipped_part_passed("omall_allshipped_part_passed", "全部发货 && 部分退款 && 审核通过"),
    omall_allshipped_part_notpassed("omall_allshipped_part_notpassed", "全部发货 && 部分退款 && 审核不通过"),
    omall_allshipped_whole("omall_allshipped_whole", "全部发货 && 全部退款"),
    omall_allshipped_whole_wait("omall_allshipped_whole_wait", "全部发货 && 全部退款 && 待审核"),
    omall_allshipped_whole_passed("omall_allshipped_whole_passed", "全部发货 && 全部退款 && 审核通过"),
    omall_allshipped_whole_notpassed("omall_allshipped_whole_notpassed", "全部发货 && 全部退款 && 审核不通过");

    public String status;

    public String msg;

    TradeStatusEnum(String status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public static String getMsgByStockStatus(String status) {
        for (TradeStatusEnum stockStatusEnum : TradeStatusEnum.values()) {
            if (stockStatusEnum.status.equalsIgnoreCase(status)) {
                return stockStatusEnum.msg;
            }
        }
        return "未知的库存状态";
    }
}
